<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="ruler" style="height: 30px"></div>
    <script src="//daybrush.com/ruler/release/latest/dist/ruler.min.js"></script>
    <script>
      const ruler = new Ruler(document.getElementById('ruler'), {
        type: 'horizontal',
      });

      window.addEventListener('resize', () => {
        ruler.resize();
      });
    </script>
  </body>
</html>
